import { createRouter,createWebHistory } from 'vue-router';

import login from '../views/login.vue'

const routes=[
    {
        path:`/`,
        name:`login`,
        component:login
    },
    {
        path:`/home`,
        name:`home`,
        component:()=>import('../views/home.vue'),
        children:[
            {
                path:`/dialog/:id`,
                name:`dialog`,
                component:()=>import('../views/childVue/dialog.vue')
            },
            {
                path:`/conversation`,
                name:`conversation`,
                component:()=>import('../views/childVue/conversation.vue')
            }

        ]
    }
];

const router = createRouter({
    routes,
    history:createWebHistory()
})

export default router;